package com.golddaymicromall.activity.storemanager;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.LinearLayout;

import com.golddaymicromall.activity.R;
import com.golddaymicromall.base.BaseActivity;
import com.golddaymicromall.util.ActivityController;

public class StoreAddBehalfActivity extends BaseActivity implements View.OnClickListener{

    private LinearLayout mBack;
    private WebView mReg_html;

    String url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_store_add_behalf);
        initView();
    }

    private void initView() {
        mBack = (LinearLayout) findViewById(R.id.back);
        mReg_html = (WebView) findViewById(R.id.reg_html);
        mBack.setOnClickListener(this);
        url = this.getIntent().getStringExtra("url");
        WebSettings settings = mReg_html.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setUseWideViewPort(true);//设置此属性，可任意比例缩放
        settings.setLoadWithOverviewMode(true);
        mReg_html.loadUrl(url);
        mReg_html.requestFocusFromTouch();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.back:
                ActivityController.getInstance().removeActivity(this);
                finish();
                break;
            default:
                break;
        }
    }
}
